<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>회원가입</title>
<link rel="stylesheet" type="text/css" href="./style/common.css" />
<script type="text/javascript">
	function windowclose(checkNicknameForm) {
		opener.document.memberupdate.nickname.value = "${nickname}";
		window.close();
	}

	function openConfirmNickname(checkNicknameForm){
		
		var url = "memberNicknameChkAction2.action?nickname="+document.checkNicknameForm.nickname.value;
		var f = document.checkNicknameForm;
		if(f.nickname.value==""){
			alert("닉네임을 입력해주세요.");
			f.nickname.focus();
			return false;
		}
		open(url ,"confirm","toolbar=no, location=no, status=co, menubar=no, scrollbars=no, resizable=no, width=400, height=200");
		
	}
	
	
	
</script>
</head>
<body>
	<div id="checknickname">
		<s:if test="chknickname==1">
			<table align="center">
				<tr>
					<td><font size="2"><b>${nickname}</b> 은(는) 이미 사용 중인 닉네임입니다</font></td>
				</tr>
			</table>
			<form action="memberNicknameChkAction2.action" method="post" name="checkNicknameForm"
				onsubmit="return check()">
				<table>
					<tr>
						<td>닉네임 <input type="text" size="10" maxlength="12" name="nickname" />
						<input type="button" class="input" value="중복확인" onclick="openConfirmNickname(this.form)" /></td>
					</tr>
				</table>
			</form>
		</s:if>

		<s:else>
			<table align="center">
				<tr>
					<td><br /> <br />입력하신 
					<b>${nickname}</b> 은(는) 사용할 수 있는 닉네임입니다. <br /> <br />
						<center>
							<input type="button" value="닫기" onclick="windowclose()"
								class="button" />
						</center></td>
				</tr>
			</table>
		</s:else>
	</div>
</body>
</html>